//// Variables ////

def a = 10
Integer b = 10
int c = 10

println c.getClass()


//// Strings ////

String s = 'hello'

def name = "Gradle"
println "$name is an awesome build tool"

def number = 4
println "number is even ? ${ number % 2 == 0 }"

def multilineString = '''\
    Hello
    World
'''
println multilineString

def r = /(\d)+/
println r.class

//// Regular Expressions ////

def pattern = ~/(\d)+/
println pattern.class

if ("groovy" ==~ /gr(.*)/)
  println "regex support rocks"

//// Closures ////
def cl1 = {
  println "hello world!"
}

cl1.call()

def cl2 = { n ->
  println "value of param : $n"
}
cl2.call(101)


3.times(cl2)

3.times { println it * it }

